<template>
  <div class="layout">
    
    <el-container class="container">
      <el-aside class="aside">
        <div class="head">
          <div>
            
            <span>代码生成器</span>
          </div>
        </div>
        <div class="line" />

          <el-menu
          background-color="#222832"
          text-color="#fff"
          
          :router="true"
        >
        
              <el-menu-item index="/"><i class="el-icon-data-line" />基本配置</el-menu-item>
              <el-menu-item index="/gendb"><i class="el-icon-data-line" />数据库</el-menu-item>
               <el-menu-item index="/gentable"><i class="el-icon-data-line" />数据表</el-menu-item>
              <el-menu-item index="/template"><i class="el-icon-data-line" />模版</el-menu-item>
              <el-menu-item index="/genCode"><i class="el-icon-data-line" />开发语言</el-menu-item>
            

        </el-menu>
      </el-aside>
      <el-container class="content">
        <Header />
        <div class="main">
          <router-view />
        </div>
        <Footer />
      </el-container>
    </el-container>
  </div>
</template>

<script>
import Header from '@/components/Header.vue';
import Footer from '@/components/Footer.vue';
export default {
  name: 'App',
  components: {
    Header,
    Footer
  },
}
</script>

<style scoped>
.el-menu{
  border-right:0px;
}
.layout {
  min-height: 100vh;
  background-color: #ffffff;
}
.container {
  height: 100vh;
}
.aside {
  width: 200px!important;
  background-color: #222832;
 
}
.head {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
   -webkit-app-region: drag;
}
.head > div {
  display: flex;
  align-items: center;
}

.head img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}
.head span {
  font-size: 20px;
  color: #ffffff;
}
.line {
  border-top: 1px solid hsla(0,0%,100%,.05);
  border-bottom: 1px solid rgba(0,0,0,.2);
}
.content {
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: hidden;
}
.main {
  height: calc(100vh - 100px);
  overflow: auto;
  padding: 10px;
}
</style>

<style>
body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
</style>